﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeacherHelp.DAL;

namespace TeacherHelp.BLL
{
    public class GradeManager
    {
        private readonly GradeService _gradeService;

        public GradeManager()
        {
            _gradeService = new GradeService();
        }

        public List<Model.Grade> GetGradeAllList()
        {
            try
            {
                Log.Info("获取班级集合..");
                var sql = _gradeService.GetGradeInfoAllSQL();
                var result = DBHelper.GetListModel<Model.Grade>(sql);
                return result;
            }
            catch (Exception ex)
            {
                Log.Error("获取班级集合出现异常！",ex);
                return default;
            }
        }
    }
}
